home *** CD-ROM | disk | FTP | other *** search
/ SGI Origin & Onyx2 Patches 1998 May / Origin and Onyx2 System Disk Patches May 1998.img / dist / patchSG0001765.idb / usr / include / dmedia / dm_timecode.h.z / dm_timecode.h
C/C++ Source or Header  |  1997-05-19  |  3KB  |  84 lines

  1. /*
  2.  *  dm_timecode.h -- Header file for libdmedia timecode manipulation
  3.  *     routines and structure definitions. 
  4.  * Also contains DMparam defintions for use by the movie library
  5.  *
  6.  * Copyright 1995 Silicon Graphics, Inc.
  7.  * All Rights Reserved.
  8.  *
  9.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  10.  * the contents of this file may not be disclosed to third parties, copied or
  11.  * duplicated in any form, in whole or in part, without the prior written
  12.  * permission of Silicon Graphics, Inc.
  13.  *
  14.  * RESTRICTED RIGHTS LEGEND:
  15.  * Use, duplication or disclosure by the Government is subject to restrictions
  16.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  17.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  18.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  19.  * rights reserved under the Copyright Laws of the United States.
  20.  */
  21.  
  22. #ifndef _DM_TIMECODE_H_
  23. #define _DM_TIMECODE_H_
  24.  
  25. #include <sys/dmcommon.h>
  26. #include <dmedia/dmedia.h>      /* for DMstatus, DMboolean, etc */
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32.         /* NOTE : Moved the timecode structure to dmcommon.h */
  33.  
  34. /* common (fully specified) timecode types */
  35. #define DM_TC_BAD          0
  36. #define DM_TC_24_ND \
  37.    DM_TC_NODROP | DM_TC_FORMAT_FILM | DM_TC_RATE_24
  38. #define DM_TC_25_ND \
  39.    DM_TC_NODROP | DM_TC_FORMAT_PAL | DM_TC_RATE_25
  40. #define DM_TC_30_ND \
  41.    DM_TC_NODROP | DM_TC_FORMAT_NTSC | DM_TC_RATE_30
  42.  
  43. /* Note that 29.97 4-field drop is what is used in NTSC */
  44. /* 29.97 8-field drop is used in M-PAL (Brazil) */
  45. #define DM_TC_2997_4FIELD_DROP \
  46.    DM_TC_DROPFRAME | DM_TC_FORMAT_NTSC | DM_TC_RATE_2997
  47. #define DM_TC_2997_8FIELD_DROP \
  48.    DM_TC_DROPFRAME | DM_TC_FORMAT_PAL | DM_TC_RATE_2997
  49.  
  50. /* Function Prototypes */
  51.  
  52. extern DMstatus dmTCToString( char * string, const DMtimecode *smpteTimecode );
  53.  
  54. extern DMstatus dmTCFromString( DMtimecode * result, const char * string,
  55.                                   int tc_type );
  56.  
  57. extern DMstatus dmTCFromSeconds( DMtimecode * result, const int tc_type,
  58.                                const double seconds );
  59.  
  60. extern DMstatus dmTCToSeconds( const DMtimecode * a, double * seconds );
  61.  
  62. extern int  dmTCFramesPerDay( const int tc_type );
  63.  
  64. extern DMstatus dmTCAddTC(  DMtimecode * result, const DMtimecode *a,
  65.                               const DMtimecode *b, int *overflow );
  66.  
  67. extern DMstatus dmTCAddFrames( DMtimecode * result, const DMtimecode * a, 
  68.                                  int  b, int * overflowunderflow );
  69.  
  70. extern DMstatus dmTCFramesBetween( int  * result, const DMtimecode * a, 
  71.                               const DMtimecode * b );
  72.  
  73. /* DMparams for timecodes */
  74. #define DM_TIMECODE_FLAGS        "DM_TIMECODE_FLAGS"
  75. #define DM_TIMECODE_FTIMESCALE        "DM_TIMECODE_FTIMESCALE"
  76. #define DM_TIMECODE_FRAME_DURATION    "DM_TIMECODE_FRAME_DURATION"
  77. #define DM_TIMECODE_NUM_FRAMES        "DM_TIMECODE_NUM_FRAMES"
  78. #define DM_TIMECODE_SRC_REF        "DM_TIMECODE_SRC_REF"
  79.  
  80. #ifdef __cplusplus
  81. }
  82. #endif
  83. #endif /* _DM_TIMECODE_H_ */
  84.